package ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.mainframeSub;

import java.awt.event.MouseAdapter;
import java.awt.event.MouseEvent;

import ch.bfh.abhmcm.SoftwareEngineeringAndDesign.view.mainframe.Mainframe;

public class ShowRFCFromTableMouseListener extends MouseAdapter {

	private RFCDisplayTable displayTable;
	private Mainframe parent;

	public ShowRFCFromTableMouseListener(Mainframe parent, RFCDisplayTable displayTable) {
		this.displayTable = displayTable;
		this.parent = parent;
	}

	@Override
	public void mouseClicked(MouseEvent e) {

		if (e.getClickCount() == 2) {

			if (displayTable.getSelectedRFCinTable()!= null) {
				
			new ShowAndCancelDialog(parent, displayTable.getSelectedRFCinTable());
			}
		}

	}
}
